module.exports = function(fontName, base64Data, list) {
  let fontFace = [
    '/*font-face-start*/',
    '@font-face {',
    '  font-family: "' + fontName + '";',
    '  src: url(data:font/truetype;charset=utf-8;base64,' + base64Data + ') format("truetype");',
    '  font-weight: 500;',
    '  font-style: normal;',
    '}',
    '/*font-face-end*/'
  ].join('\n');

  let cssText = list.map(function (v) {
    return '.icon-' + v.name + ':before {\n  content: "\\' + v.codePoint.toString(16) +'";\n}';
  }).join('\n');
  let fontCss = '/*font-icon-start*/\n' + cssText + '\n/*font-icon-end*/';

  return { fontFace, fontCss };
};

